/*
输入某年某月某日，判断这一天是这一年的第几天？
*/

#if  1
#include <stdio.h>
int main()
{
    int data[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
    int temp = 0;
    int year;
    int mouth;
    int day;
    printf("请输入年份\n");
    scanf("%d",&year);
    printf("请输入月份\n");
    scanf("%d",&mouth);
    printf("请输入那天\n");
    scanf("%d",&day);

    for (int i = 0; i < mouth - 1; i++)
    {
        temp += data[i];
    }
    temp += day;
    
    if (mouth > 2 && (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) )
    {
        printf("%d",temp + 1);
        return 0;
    }
    printf("这一年的第%d天",temp);
    return 0;
}
#endif